home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / graphics / utils / mandelmania_v4.1 / forms / createanims.form
Text File  |  1993-10-28  |  3KB  |  137 lines

  1.  
  2.                      Form file for MANDELMANIA 4.0
  3.                      -------------------------------
  4.  
  5.  
  6. This is the form file for Mandelmania's output ARexx-files. Mandelmania can create
  7. ARexx-files automatically. This is useful especially when calculating animations.
  8.  
  9. There are different sections in this file:
  10.  
  11. 1. @HEAD:        This section is written at the beginning of the ARexx-file
  12. 2. @APPEND:
  13. 3. @INTERPOLATE: These sections will be added to the ARexx-file, if the user
  14.                  selected Append or Interpolate from the ARexx menu
  15. 4. @TAIL:        This section is written at the end of the ARexx-file
  16.  
  17. These keywords must be at the beginning of the line to be recognized, and they
  18. must appear in this file in the described order. At the end of the file
  19. must be a @END.
  20.  
  21.  
  22. There are several variables that can be used:
  23.  
  24. Fractal coordinates:   @{left}, @{right}, @{top}, @{bottom}
  25. Julia constants:       @{xc}, @{yc}
  26. Number of interations: @{iterations}
  27. Fractal type:          @{type}
  28. Interpolation steps:   @{steps}
  29.  
  30.  
  31. @HEAD
  32. /*--------------------------------------------------------------------------*/
  33. /*                   Mandelmania - ARexx - Script - File                    */
  34. /*--------------------------------------------------------------------------*/
  35.  
  36. address 'rexx_mandelmania'
  37. options results
  38.  
  39. signal on ERROR
  40. signal on BREAK_C
  41. signal on BREAK_D
  42.  
  43. 'getanimfilename'
  44. animname = result
  45.  
  46. if result = 'RESULT' then do
  47.     exit 0
  48.     end
  49.  
  50. 'openanim' animname'.anim'
  51.  
  52. pic      = 0
  53.  
  54. /*--------------------------------------------------------------------------*/
  55.  
  56. @APPEND
  57.  
  58. left1   = '@{left}'
  59. right1  = '@{right}'
  60. bottom1 = '@{bottom}'
  61. top1    = '@{top}'
  62. xc1     = '@{xc}'
  63. yc1     = '@{yc}'
  64. iter1   = @{iterations}
  65. type    = @{type}
  66.  
  67. 'calculate' left1 right1 bottom1 top1 xc1 yc1 iter1 type
  68. 'saveanim'
  69. if pic <= 1 then do
  70.     'savefractal' animname'.'pic
  71.     end
  72.  
  73. pic = pic+1
  74.  
  75. /*--------------------------------------------------------------------------*/
  76.  
  77. @INTERPOLATE
  78.  
  79. left2   = '@{left}'
  80. right2  = '@{right}'
  81. bottom2 = '@{bottom}'
  82. top2    = '@{top}'
  83. xc2     = '@{xc}'
  84. yc2     = '@{yc}'
  85. iter2   = @{iterations}
  86.  
  87. steps   = @{steps}
  88.  
  89. do i=pic to pic+steps-1
  90.     say 'interpolate' i-pic steps
  91.     'interpolate' i-pic+1 steps left1 right1 bottom1 top1 xc1 yc1 iter1 left2 right2 bottom2 top2 xc2 yc2 iter2 type
  92.     'saveanim'
  93.     if i <= 1 then do
  94.         'savefractal' animname'.'i
  95.         end
  96.     end
  97.  
  98. left1   = left2;
  99. right1  = right2;
  100. bottom1 = bottom2;
  101. top1    = top2;
  102. xc1     = xc2;
  103. yc1     = yc2;
  104. iter1   = iter2;
  105. pic = pic+steps
  106.  
  107. /*--------------------------------------------------------------------------*/
  108.  
  109. @TAIL
  110.  
  111. BREAK_C:
  112. BREAK_D:
  113.  
  114. 'openfractal' animname'.0'    /* For looped animations */
  115. 'saveanim'
  116. 'openfractal' animname'.1'
  117. 'saveanim'
  118.  
  119. 'closeanim'
  120.  
  121. address command 'delete' animname'.0 QUIET'
  122. address command 'delete' animname'.1 QUIET'
  123. exit 0
  124.  
  125. ERROR:
  126. if (RC ~= 0) then do
  127.     say ' 'SIGL '*-*' SOURCELINE(SIGL)
  128.     say '    Error' RC
  129.     end
  130.  
  131. 'closeanim'
  132. address command 'delete' animname'.0 QUIET'
  133. address command 'delete' animname'.1 QUIET'
  134. exit 10
  135.  
  136. @END
  137.